#include <stdio.h>
#define SIZE 10
double result(double num[], int n);
int main(void)
{
	double data[SIZE] = {2.0,55.0,55.6,1.0,33.0,56,23,89,22,56.7};
	printf("The difference between max and min is ");
	printf("%g",result(data,SIZE));
	printf("\n");
	return 0;
}
double result(double num[],int n)
{
	double max=num[0];
	double min=num[0];
	for (int i = 1; i < 10; i++)
	{
		if (max < num[i])
			max = num[i];
	}
	for (int i = 1; i < 10; i++)
	{
		if (min > num[i])
			min = num[i];
	}
	return max - min;
}